// BaseDialog.cpp : implementation file
//

#include "stdafx.h"
#include "mfc_test.h"
#include "BaseDialog.h"


// CBaseDialog dialog

IMPLEMENT_DYNAMIC(CBaseDialog, CDialog)

CBaseDialog::CBaseDialog(UINT id /* = IDD */, CWnd* pParent /* = NULL */)
	: CDialog(id, pParent)
{
  
}

CBaseDialog::~CBaseDialog()
{
}

void CBaseDialog::DoDataExchange(CDataExchange* pDX)
{
  CDialog::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_STATIC_TEXT, m_conContent);
  DDX_Control(pDX, IDC_LIST1, m_conListCtrl);
}


BEGIN_MESSAGE_MAP(CBaseDialog, CDialog)
  ON_BN_CLICKED(IDC_BUTTON_TEST, &CBaseDialog::OnBnClickedButtonTest)
  ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST1, &CBaseDialog::OnLvnItemchangedList1)
END_MESSAGE_MAP()


// CBaseDialog message handlers

void CBaseDialog::OnBnClickedButtonTest()
{
  // TODO: Add your control notification handler code here
}

BOOL CBaseDialog::OnInitDialog()
{
  CDialog::OnInitDialog();

  // TODO:  Add extra initialization here

  GetDlgItem(IDC_STATIC_TEXT)->SetWindowText("hahahehe");

  return TRUE;  // return TRUE unless you set the focus to a control
  // EXCEPTION: OCX Property Pages should return FALSE
}

void CBaseDialog::OnLvnItemchangedList1(NMHDR *pNMHDR, LRESULT *pResult)
{
  LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
  // TODO: Add your control notification handler code here

  *pResult = 0;
}